<?php

namespace App\Http\Models;


use Illuminate\Database\Eloquent\Builder;

/**
 * @property string name
 *
 * @mixin Builder
 */
class ArticleTag extends BosModel
{
    use SafeSave;

    protected static $unguarded = true;

    protected $bosKeyPrefix = 'bym-admin/article/';

    protected $table = 'article_tags';

    public function tags()
    {
        return $this->hasMany( ArticleTag::class, 'super_tag_id','id' );
    }

    public function articles()
    {
        return $this->belongsToMany( Article::class ,'article_pivot_tag','article_tag_id','article_id');

    }
}
